package com.registration.context;

public class DoctorContext {
    private static ThreadLocal<Integer> doctorIdHolder = new ThreadLocal<>();

    // 设置当前登录医生ID
    public static void setDoctorId(Integer doctorId) {
        doctorIdHolder.set(doctorId);
    }

    // 获取当前登录医生ID
    public static Integer getDoctorId() {
        return doctorIdHolder.get();
    }

    // 清除线程变量
    public static void clear() {
        doctorIdHolder.remove();
    }
}
